package com.avril.ui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class MainAction {

	public static ActionListener clickGoodsInfoManager() {
		return new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				GoodsFrame goodsFrame = new GoodsFrame();
				MainFrame.getMainFrame().getContentPane().add(goodsFrame);
				goodsFrame.setVisible(true);
			}
		};
	}

	public static ActionListener clickGoodsTypeManager() {
		return new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				GoodsTypeFrame goodsFrame = new GoodsTypeFrame();
				MainFrame.getMainFrame().getContentPane().add(goodsFrame);
				goodsFrame.setVisible(true);
			}
		};
	}

	public static ActionListener sales() {
		return new ActionListener() {

			public void actionPerformed(ActionEvent e) {
				SalesFrame salesFrame = new SalesFrame();
				MainFrame.getMainFrame().getContentPane().add(salesFrame);
				salesFrame.setVisible(true);
			}
		};
	}

	public static ActionListener salesManage() {
		return new ActionListener() {

			public void actionPerformed(ActionEvent e) {
				SalesManageFrame salesManageFrame = new SalesManageFrame();
				MainFrame.getMainFrame().getContentPane().add(salesManageFrame);
				salesManageFrame.setVisible(true);
			}
		};
	}

	public static ActionListener importGoods() {
		return new ActionListener() {

			public void actionPerformed(ActionEvent e) {
				ImportFrame importFrame = new ImportFrame();
				MainFrame.getMainFrame().getContentPane().add(importFrame);
				importFrame.setVisible(true);
			}
		};
	}
	
	public static ActionListener importManage() {
		return new ActionListener() {

			public void actionPerformed(ActionEvent e) {
				ImportManageFrame importManageFrame = new ImportManageFrame();
				MainFrame.getMainFrame().getContentPane().add(importManageFrame);
				importManageFrame.setVisible(true);
			}
		};
	}

	public static ActionListener changePassword() {
		return new ActionListener() {

			public void actionPerformed(ActionEvent e) {
				ChangePasswordFrame changePasswordFrame = new ChangePasswordFrame();
				MainFrame.getMainFrame().getContentPane().add(
						changePasswordFrame);
				changePasswordFrame.setVisible(true);
			}
		};
	}

	public static ActionListener userManager() {
		return new ActionListener() {

			public void actionPerformed(ActionEvent e) {
				UserManagerFrame userManagerFrame = new UserManagerFrame();
				MainFrame.getMainFrame().getContentPane().add(userManagerFrame);
				userManagerFrame.setVisible(true);
			}
		};
	}
}
